<template>
  <div id="micro-app" class="dmapt-app">
    <router-view></router-view>
  </div>
</template>

<script>
import router from './router'
import { loadingDotSpin as loader } from '@daelui/vdog/dist/components.js'

export default {
  name: 'App',

  mounted () {
    router.beforeEach((to, from, next) => {
      // 开启进度条
      loader.start()
      next()
    })
    router.afterEach(() => {
      // 关闭进度条
      loader.done()
    })
    // 关闭初始进度条
    let lm = document.querySelector('.d-loading-maker')
    lm && (lm.style.display = 'none')
  }
}
</script>

<style>
body {
  margin: 0;
  padding: 0;
}
.dmapt-app {
  font-family: Avenir, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  color: #2c3e50;
}
.text-center {
  text-align: center;
}
.text-right {
  text-align: right;
}
</style>
